﻿/*
 * Created by SharpDevelop.
 * User: alex
 * Date: 22.01.2012
 * Time: 19:08
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Collections.Generic;

namespace DrawTest
{
	
	public class DataStore
	{
		public DataStore()
		{
			CurrentAngle = 0;
			MissileLeft = 0;
			AzimuthLines = new List<FarLine>();
			AirCrafts = new List<AirCraft>();
			Missiles = new List<Missile>();
		}
		
		public int CurrentAngle { get; set; }
		public int MissileLeft { get; set; }
		public int angleRotatRec { get; set; }
		
		
		public List <FarLine> AzimuthLines { get; set; }
		public List <AirCraft> AirCrafts { get; set; }
		public List <Missile> Missiles { get; set; }
	}
	
	
	public class MyPoint
	{
		public MyPoint(int x, int y){
			this.X = x;
			this.Y = y;
		}
		
		
		public int X { get; set; }
		public int Y { get; set; }
		
		
		public static bool operator ==(MyPoint a, MyPoint b)
		{
			if (System.Object.ReferenceEquals(a, b)){
				return true;
			}
			if (((object)a == null) || ((object)b == null)){
				return false;
			}

			// Return true if the fields match:
			return a.X == b.X && a.Y == b.Y;
		}

		public static bool operator !=(MyPoint a, MyPoint b)
		{
			return !(a == b);
		}
		
		public override bool Equals(Object obj)
		{
			if (obj == null || GetType() != obj.GetType())
				return false;

			MyPoint p = (MyPoint)obj;
			return (X == p.X) && (Y == p.Y);
		}
		
		public override int GetHashCode()
		{
			return X ^ Y;
		}
		
	}
	

	
	public class MyAngleLen
	{
		public MyAngleLen(int ang, int len){
			this.Ang = ang;
			this.Len = len;
		}
		
		public int Len { get; set; }
		public int Ang { get; set; }
	}
}
